package exception;

import java.io.FileOutputStream;
import java.io.IOException;

public class AutoCloseableDemo {
    public static void main(String[] args) {
        try(FileOutputStream file=new FileOutputStream("fos.dat");) {
            file.write(1);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
